<template>
	<div class="app">
		<view class="head">
			<view class="head_one">
				<view>
					<uni-icons @click='goBack' type="left" size="30"></uni-icons>
				</view>
				<view>评论</view>
				<view>
					<button class="fabiao_btn">
						<p>发表</p>
					</button>
				</view>
			</view>
		</view>
		<view class="main">
			<view class="main_box">
				<view class="box_top">
					<image style="width: 80rpx ; height: 80rpx;"
						src="https://cdn8.axureshop.com/demo2024/2251242/images/%E5%8F%91%E8%A1%A8%E6%99%AF%E7%82%B9%E8%AF%84%E8%AE%BA/u862.svg"
						mode=""></image>
					<span>故宫博物馆</span>
				</view>
				<view class="box_score">
					<span>评分：</span>
					<view class="start">
						<!-- 使用组件 -->
						<Rate />
					</view>
				</view>
				<view class="box_text">
					<!-- 使用组件-->
					<Textarea />
					<view class="wenzi">
						还差
						<span style="color: red;">15</span>
						字
					</view>
				</view>
				<view class="box_upload ">
					<!-- 使用组件-->
					<Upload />
				</view>
				<view class="box_name">
					<!-- 使用组件-->
					<Name />
				</view>

			</view>
		</view>
	</div>

</template>

<script setup>
	import {
		useRouter
	} from 'vue-router';

	import {
		ref
	} from 'vue';
	//引入组件
	import Rate from '@/pages/models/Rate.vue';
	import Textarea from '@/pages/models/Textarea.vue';
	import Upload from '@/pages/models/Upload.vue';
	import Name from "@/pages/models/Name.vue"
	const router = useRouter();
	//跳转
	function goBack() {
		router.push({
			path: '/pages/index/index' // 页面路径，必须以 '/' 开头
		});
	}
</script>

<style scoped lang="less">
	.box_name {
		margin-top: 30rpx;
	}

	.box_upload {
		margin-top: 30rpx;
		/* background-color: pink; */
	}

	.box_text {
		position: relative;
	}

	.wenzi {
		font-size: 25rpx;
		color: #999999;
		position: absolute;
		right: 10rpx;
		bottom: 10rpx;
	}

	.rate-container {
		width: 100%;
		height: 100%;
	}

	.start {
		flex: 1;
	}

	.box_score {
		margin: 30rpx 0px 30rpx 0px;
		display: flex;
		width: 100%;
		height: 100%;

	}

	.box_top {
		display: flex;
		align-items: center;

		image {
			margin: 0px 10rpx 0px 0px;
		}
	}

	.fabiao_btn {
		width: 60px;
		height: 30px;
		background: -webkit-linear-gradient(0deg, rgba(52, 120, 246, 1) 0%, rgba(2, 167, 240, 1) 99%);
		background: -moz-linear-gradient(90deg, rgba(52, 120, 246, 1) 0%, rgba(2, 167, 240, 1) 99%);
		background: linear-gradient(90deg, rgba(52, 120, 246, 1) 0%, rgba(2, 167, 240, 1) 99%);
		border: none;
		border-radius: 15px;
		-moz-box-shadow: none;
		-webkit-box-shadow: none;
		box-shadow: none;
		font-size: 14px;
		border-width: 0px;
		color: #fff;

		p {
			width: 100%;
			height: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}

	.app {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		background-color: rgba(247, 247, 247, 1);
	}

	.head {
		/* width: 100%; */
		line-height: 30px;
		padding: 10px;
	}

	.head_one {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 10px;
	}



	.main {
		flex: 1;
		overflow-y: auto;
		padding: 0rpx 20rpx 0rpx 20rpx;
	}

	.main_box {
		background-color: #fff;
		border-radius: 10rpx;
		padding: 20rpx;
	}
</style>